package com.starview.star.compiler.wff;

import com.starview.platform.data.type.Location;
import com.starview.star.compiler.ast.Abstract;
import com.starview.star.compiler.ast.IAbstract;
import com.starview.star.compiler.standard.StandardNames;
import com.starview.star.compiler.util.PrettyPrintDisplay;

@SuppressWarnings("serial")
public class WffTuple implements WffOp
{

  @Override
  public applyMode apply(IAbstract term, IAbstract[] env, Location loc, WffEngine engine)
  {
    if (Abstract.isTupleTerm(term))
      return applyMode.validates;
    else
      return applyMode.notValidates;
  }

  @Override
  public void prettyPrint(PrettyPrintDisplay disp)
  {
    disp.appendWord(StandardNames.WFF_TUPLE);
  }

  @Override
  public long specificity()
  {
    return 1;
  }
}
